#ifndef __MOTOR_H
#define __MOTOR_H

#include "at32f413_board.h"
#include "math_utils.h"
#include "mt6701.h"
#include "driver_hardware.h"
#include "current_sense.h"
#include "pid.h"
#include "lowpass_filter.h"
#include "arm_math.h"
#include "speed_timer.h"
#include "debug_serial.h"

void eg2133_Init(void);
void SetVoltage(float _voltageA, float _voltageB, float _voltageC);
float VelocityOpenLoopTick(float _target);
void SetPhaseVoltage(float _voltageQ, float _voltageD, float _angleElectrical);

float GetElectricalAngle(void);
void AlignSensor(void);
void motor_FocOutputTick(void);

#endif // __MOTOR_H
